libxenlight: add error in disk_add if phystype is not recognized
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 14 Jan 2010 09:42:06 +0000 (09:42 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 14 Jan 2010 09:42:06 +0000 (09:42 +0000)
Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
tools/libxl/libxl.c

index ede485b111677eeb6aa8928a075b35474318d04a..909bd173f07713425c6ad2ec72337f705866addb 100644 (file)
@@ -1162,6 +1162,9 @@ int libxl_device_disk_add(struct libxl_ctx *ctx, uint32_t domid, libxl_device_di
 
             device.backend_kind = DEVICE_TAP;
             break;
+        default:
+            XL_LOG(ctx, XL_LOG_ERROR, "unrecognized disk physical type: %d\n", disk->phystype);
+            return ERROR_INVAL;
     }
 
     flexarray_set(back, boffset++, "frontend-id");